package com.huike.web.controller.report;

import com.huike.clues.domain.vo.IndexStatisticsVo;
import com.huike.common.core.domain.AjaxResult;
import com.huike.report.domain.vo.ClueFunnelVo;
import com.huike.report.service.IReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.huike.common.core.controller.BaseController;


@RestController
@RequestMapping("/report")
public class ReportController extends BaseController {

    @Autowired
    private IReportService iReportService;
    /**
     * 线索转化漏斗接口
     */
    @GetMapping("/getVulnerabilityMap/{beginCreateTime}/{endCreateTime}")
    public AjaxResult getVulnerabilityMap(@PathVariable("beginCreateTime")String beginCreateTime, @PathVariable("endCreateTime")String endCreateTime ){
        IndexStatisticsVo request = new IndexStatisticsVo();
        request.setBeginCreateTime(beginCreateTime);
        request.setEndCreateTime(endCreateTime);
        ClueFunnelVo clueFunnelVo = iReportService.getSomeNums(request);
        return AjaxResult.success(clueFunnelVo);
    }

}